from ability.models import UserProfile
from rest_framework import serializers

class AdminsSerializer(serializers.ModelSerializer):
  create_time = serializers.DateTimeField(format="%Y-%m-%d %H:%M:%S")
  class Meta:
    model = UserProfile
    fields = ['id', 'username', 'phone', 'user_type', 'email', 'sex', 'user_status', 'create_time']

class AdminUpdateSerializer(serializers.ModelSerializer):

  class Meta:
    model = UserProfile
    fields = ['username', 'phone', 'user_type', 'email', 'sex', 'user_status']
